#include "xmppcore/xmppparserfactory.h"

#include <QtCore/QObject>

namespace yoohoo_xmppcore {

class XmppParsingFactory;

class InBandData : public XmppObject {
public:
	void setSeq(int seq);
	int seq();
	void setSid(QString sid);
	QString sid();
	void setText(QString text);
	QString text();

private:
	int _seq;
	QString _sid;
	QString _text;

};

class InBandDataParser : public XmppParser {
public:
	InBandDataParser();
	XmppObject* obj();
	bool processAttributes(QString path, QList<ParsingAttribute> attributes);
	bool processText(QString path, QString text);

private:
	InBandData* _inBandData;
};

class InBandDataParserFactory : public XmppParserFactory {
public:
	ProtocolKey protocolKey();
	XmppParser* createParser();
};

class EscapeYourData : public XmppObject {
};

class EscapeYourDataParser : public XmppParser {
public:
	EscapeYourDataParser();
	XmppObject* obj();
	bool processAttributes(QString path, QList<ParsingAttribute> attributes);
	bool processText(QString path, QString text);

private:
	EscapeYourData* _escapeYourData;
};

class EscapeYourDataParserFactory : public XmppParserFactory {
public:
	ProtocolKey protocolKey();
	XmppParser* createParser();
};

class TooManyParameters : public XmppObject {
};

class TooManyParametersParser : public XmppParser {
public:
	TooManyParametersParser();
	XmppObject* obj();
	bool processAttributes(QString path, QList<ParsingAttribute> attributes);
	bool processText(QString path, QString text);

private:
	TooManyParameters* _tooManyParameters;
};

class TooManyParametersParserFactory : public XmppParserFactory {
public:
	ProtocolKey protocolKey();
	XmppParser* createParser();
};

class XmppParsingFactoryTest : public QObject {
	Q_OBJECT
private slots:
	void init();
	void testPresence();
	void testMessage();
	void testEmbedded();
	void testStreamError();
	void testStanzaError();
	void testInterference();
	void cleanup();

private:
	XmppParsingFactory* _parsingFactory;
};

}
